package io.xxx.xbutler.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum HeartbeatStatus {

    OFFLINE(10),

    ONLINE(20);

    private final int value;

    public static HeartbeatStatus valueOf(int value) {
        for (HeartbeatStatus status : HeartbeatStatus.values()) {
            if (status.value == value) {
                return status;
            }
        }
        return null;
    }
}
